
/** S 订单 **/
import request from "@/utils/request";
import {ApplyRefundType} from "@/api/order";

/**
 * @return { Promise }
 * @description 初始化订单
 * @param data
 */
export function add(data: any) {
    return request.post({ url: '/orderAccept/add', data: data }, { isAuth: true })
}
/**
 * @return { Promise }
 * @description 预约
 * @param data
 */
export function appointment(data: ApplyRefundType) {
    return request.post({ url: '/orderAccept/appointment', data: data }, { isAuth: true })
}
/**
 * @return { Promise }
 * @description 确认收款
 * @param data
 */
export function receivePayment(data: any) {
    return request.post({ url: '/orderAccept/receivePayment', data: data }, { isAuth: true })
}

/**
 * @return { Promise }
 * @description 服务中（已预约）列表
 * @param data
 */
export function orderRservedLists(data: any) {
    return request.get({ url: '/orderAccept/reservedList', data: data }, { isAuth: false })
}
export function completedLists(data: any) {
    return request.get({ url: '/orderAccept/completedList', data: data }, { isAuth: false })
}
/**
 * @return { Promise }
 * @description 已接单列表，待预约列表
 * @param data
 */
export function orderAcceptLists(data: any) {
    return request.get({ url: '/orderAccept/list', data: data }, { isAuth: false })
}


/**
 * @return { Promise }
 * @description 提交订单
 * @param data
 */
export function orderSubmit(data: any) {
    return request.post({ url: '/orderAccept/submit', data: data }, { isAuth: true })
}